From: Sean Khan Date: Tue, 2 Jul 2024 09:48:49 +0000 (-0400) Subject: luci-app-dawn: Fix TypeError undef (reading '0') X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=65f8c140e035a0355760b169dcff557b15b13a63;p=project%2Fluci.git luci-app-dawn: Fix TypeError undef (reading '0') Fixes error with hearing map showing: ``` Cannot read properties of undefined (reading '0') ``` Signed-off-by: Sean Khan --- diff --git a/applications/luci-app-dawn/htdocs/luci-static/resources/view/dawn/hearing_map.js b/applications/luci-app-dawn/htdocs/luci-static/resources/view/dawn/hearing_map.js index 8b93fbfd6d..fdf840e4ba 100644 --- a/applications/luci-app-dawn/htdocs/luci-static/resources/view/dawn/hearing_map.js +++ b/applications/luci-app-dawn/htdocs/luci-static/resources/view/dawn/hearing_map.js @@ -90,9 +90,11 @@ return view.extend({ ap[1].score ] } + return undefined; }) }).flat(); + clients = clients.filter(client => client !== undefined); cbi_update_table(hearing_map_table, clients, E('em', _('No clients connected.')));